<!-- 插座控制面板 -->

<template>
    <div class="kongTiaoControl">
        <div class="leftControl">
            <div class="item" style="justify-content: left; padding-left: 63px; font-weight: bold">照明回路</div>
            <div class="item">
                <div class="p50">
                    <div class="control" style="flex-direction: row">
                        <label>总功率（W）</label> <el-input-number v-model="gzl" :min="1" :max="10000" label="描述文字"></el-input-number>
                    </div>
                </div>
                <div class="p50">
                    <div class="control" style="flex-direction: row">
                        <label>恢复时间（分）</label>
                        <el-input-number v-model="hfsj" :min="1" :max="100" label="描述文字"></el-input-number>
                    </div>
                </div>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（1）</label>
                <el-date-picker
                    v-model="sdkzRq1"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（2）</label>
                <el-date-picker
                    v-model="sdkzRq2"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（3）</label>
                <el-date-picker
                    v-model="sdkzRq3"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
        </div>
        <div class="leftControl">
            <div class="item" style="justify-content: left; padding-left: 63px; font-weight: bold">插座回路</div>
            <div class="item">
                <div class="p50">
                    <div class="control" style="flex-direction: row">
                        <label>总功率（W）</label> <el-input-number v-model="gzl" :min="1" :max="10000" label="描述文字"></el-input-number>
                    </div>
                </div>
                <div class="p50">
                    <div class="control" style="flex-direction: row">
                        <label>恢复时间（分）</label>
                        <el-input-number v-model="hfsj" :min="1" :max="100" label="描述文字"></el-input-number>
                    </div>
                </div>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（1）</label>
                <el-date-picker
                    v-model="sdkzRq1"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（2）</label>
                <el-date-picker
                    v-model="sdkzRq2"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
            <div class="item">
                <label class="sdkz">时段控制（3）</label>
                <el-date-picker
                    v-model="sdkzRq3"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    style="width: 260px; margin-right: 10px"
                >
                </el-date-picker>
                <el-button type="primary">开启</el-button>
                <el-button type="danger">关闭</el-button>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: ['currentNodeId', 'currentNodeName', 'dir'],
    components: {},
    name: 'chaZuoControl',
    data() {
        return {
            gzl: 1000,
            hfsj: 10,
            tempList: [],
            curTemp: 17,
            sdkzRq1: '',
            sdkzRq2: '',
            sdkzRq3: '',
            qkgljc: true,
            ms1: '1',
            ms1Time: '',
            ms2: '1',
            ms2Time: '',
            ms3: '1',
            ms3Time: '',
            ms4: '1',
            ms4Time: '',
            ms5: '1',
            ms5Time: '',
            ms6: '1',
            ms6Time: '',
            selectList: [
                {
                    label: '固定',
                    value: '1'
                },
                {
                    label: '日出前',
                    value: '2'
                },
                {
                    label: '日出后',
                    value: '3'
                },
                {
                    label: '日落前',
                    value: '4'
                },
                {
                    label: '日落前',
                    value: '5'
                }
            ]
        }
    },
    computed: {},
    created() {
        this.getTemp()
    },
    methods: {
        changeTemp(e) {
            console.log(e, 'e....')
            this.curTemp = e
        },
        getTemp() {
            let item = []
            for (let index = 15; index < 40; index++) {
                item.push(index)
            }
            this.tempList = item
        }
    }
}
</script>

<style scoped lang="scss">
.kongTiaoControl {
    display: flex;
    gap: 10px;
    .leftControl {
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        width: 50%;
        padding-bottom: 10px;
        .item {
            display: flex;
            gap: 10px;
            flex-direction: row;
            padding-top: 10px;
            padding-left: 10px;
            align-items: center;
            justify-content: center;
        }
        .p50 {
            width: 100%;
            padding: 0 10px;
            label {
                font-size: 14px;
            }
            .control {
                display: block;
                align-items: center;
                justify-content: center;
                display: flex;
                margin-bottom: 10px;
                flex-direction: column;
                gap: 10px;
                .border {
                    border-top-left-radius: 8px;
                    border-top-right-radius: 8px;
                    border: 1px solid #e0e0e0;
                    width: 100%;
                    text-align: left;
                    .header {
                        .icon {
                            margin-top: 4px;
                            float: left;
                            margin-right: 5px;
                        }
                        height: 25px;
                        line-height: 23px;
                        border-bottom: 1px solid #e0e0e0;
                        padding: 0 10px;
                        color: #5795d4;
                        background-color: #f5f7fa;
                    }
                    .body {
                        text-align: center;
                        padding: 10px;
                        min-height: 52px;
                        .bodyBorder {
                            display: flex;
                            cursor: pointer;
                            .item {
                                flex: 1;
                                display: flex;
                                flex-direction: column;
                                justify-content: center;
                                align-items: center;
                                gap: 5px;
                                border: 1px solid #e0e0e0;
                                border-radius: 4px;
                                padding: 5px;
                                margin-right: 5px;
                                cursor: pointer;
                            }
                            label {
                                cursor: pointer;
                            }
                            img {
                                width: 16px;
                                cursor: pointer;
                                height: 16px;
                            }
                        }
                    }
                }
            }
        }
    }
}
</style>
